package com.xyrl.project.common.common.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.xyrl.project.common.base.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;


/**
 * @author zhongp
 * @version 1.0
 * @className Attachment.java
 * @company 重庆星纭融链科技公司
 * @date 2019-12-27 16:39:32
 * @Description 附件实体类
 */
@Data
@TableName("t_attachment")
@ApiModel(value = "Attachment对象", description = "附件")
public class Attachment extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "附件名称")
    @NotBlank(message = "附件名称不能为空")
    @Length(min = 1, max = 255, message = "附件名称必须在{min}~{max}字符之间")
    private String name;

    @ApiModelProperty(value = "附件类型")
    @NotBlank(message = "附件类型不能为空")
    @Length(min = 1, max = 64, message = "附件类型必须在{min}~{max}字符之间")
    private String type;

    @ApiModelProperty(value = "附件路径")
    @NotBlank(message = "附件路径不能为空")
    @Length(min = 1, max = 255, message = "附件路径必须在{min}~{max}字符之间")
    private String path;

    @ApiModelProperty(value = "附件状态（0 未使用，1 己使用，2 己删除）")
    @NotNull(message = "附件状态（0 未使用，1 己使用，2 己删除）不能为空")
    private Integer status;

    @ApiModelProperty(value = "创建用户类型（SYSTEM 后台人员，SALESMAN 客户经理，CUSTOMER 客户）")
    @NotNull(message = "创建用户类型（SYSTEM 后台人员，SALESMAN 客户经理，CUSTOMER 客户）不能为空")
    private String userType;
    /**
     * ali oss bucket 名称  用于组装附件直实地址
     */
    private String bucketName;

    @ApiModelProperty(value = "创建用户")
    @NotNull(message = "创建用户不能为空")
    private Long createUserId;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;


}
